import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

const store = new Vuex.Store({
    state() {
        return {
            filterEquipment_type: {},
            filterEquipment_alarm: {},
            filterEquipment_link: {},
            filterEquipment_address: {},
        }
    },
    mutations: {
        INCREMENTTYPE(state,payload) {
            // 置空传入APP.vue传来的设备类型数据
            state.filterEquipment_type = {}
            state.filterEquipment_type = payload
        },
        INCREMENTALARM(state,payload) {
            // 置空传入APP.vue传来的设备类型数据
            state.filterEquipment_alarm = {}
            state.filterEquipment_alarm = payload
        },
        INCREMENTLINK(state,payload) {
            // 置空传入APP.vue传来的设备类型数据
            state.filterEquipment_link = {}
            state.filterEquipment_link = payload
        },
        INCREMENTADDRESS(state,payload) {
            // 置空传入APP.vue传来的设备类型数据
            state.filterEquipment_address = {}
            state.filterEquipment_address = payload
        }

    }
});

export default store

